<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<meta name="keywords" content="">
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<link rel="stylesheet" href="/home/css/base.css">
	<link rel="stylesheet" type="text/css" href="/home/css/swiper.min.css"/>
	<link rel="stylesheet" href="/home/css/dian.css">
	<script src="/home/js/jquery-3.1.1.min.js"></script>
	<script src="/home/js/swiper.min.js"></script>
	{include file="public/css"}
</head>
<body>
	<div class="dian-content o_hidden">
		<div class="ac-bottom o_hidden">
			<div class="text-c">
				{if condition="session('atype') neq 1"}
				<select name="sid" class="input-text Wdate" style="width:250px" onchange="window.location=this.value">
					<option value="{:url('cost')}&keywords={$keywords}">机构选择</option>
					{volist name="jigou" id="j"}
					<option value="{:url('cost')}?aid={$j.aid}&keywords={$keywords}" {:$aid==$j.aid?'selected':''}>{$j.name}</option>
					{/volist}
				</select>
				{/if}

				<select name="sid" class="input-text Wdate" style="width:100px;margin-right: 20px;" onchange="window.location=this.value">
					<option value="{:url('cost')}?aid={$aid}&keywords={$keywords}">批次选择</option>
					{volist name="pici" id="c"}
					<option value="{:url('cost')}?aid={$aid}&pid={$c.id}&keywords={$keywords}" {:$c.id==$pid?'selected':''} data-pid="{$pid}">{$c.name}</option>
					{/volist}
				</select>
				{if condition="session('atype') neq 1"}
				<input type="text" name="keywords" value="{$keywords}" class="input-text" style="width:150px;" placeholder="请输入培训机构名字">
				<button type="button" class="btn btn-success"><i class="Hui-iconfont">&#xe665;</i> 点击搜索</button>
				{/if}
			</div>
			{if condition="!empty($list)"}
			<div class="ac-table o_hidden">
				<div class="actable-list o_hidden">
					<ul class="o_hidden">
						<li style="width: 100%">
							<p>
								<a style="text-decoration: none">
									共有考生<span style="color:red">{$num}</span>人&nbsp;&nbsp;&nbsp;&nbsp;
									合计<span style="color:red">{$total}</span>元&nbsp;&nbsp;&nbsp;&nbsp;
									{if condition="session('atype') neq 1"}应付<span style="color:red">{$discount}</span>元{/if}
								</a>

									<!-- {if condition="!empty($pinfo) and $pinfo.pay_state neq 1"}
									<a style="float:right;color:red;" class="pay" href="javascript:;">前往支付</a>
									{/if} -->
									{if condition="!empty($pinfo) and $pinfo.pay_state eq 1"}
									<a style="float:right">已支付</a>
									{/if}
							</p>
						</li>
						{volist name="list" id="l"}
						<li style="border: 1px solid #dcdcdc">
							<p>
								<a style="text-decoration: none">
									<span style="color:red">{$l.name}</span>&nbsp;&nbsp;&nbsp;&nbsp;
									共<span style="color:red">{$l.num}</span>人&nbsp;&nbsp;&nbsp;&nbsp;
									每人<span style="color:red">{$l.money}</span>元&nbsp;&nbsp;&nbsp;&nbsp;
									合计<span style="color:red">{:$l.num*$l.money}</span>元
								</a>
							</p>
						</li>
						{/volist}
					</ul>
				</div>
			</div>
			{else /}
			暂无数据
			{/if}
		</div>
	</div>
	<script src="/public/demo/layer3.1.0/layer/layer.js"></script>
	<script>
		$(".pay").click(function(){
			var pid="{$pid}";//$("select[name=sid]").find("option:selected").val();//
			if(pid!=""){
				location.href="{:url('order/orders')}?pid="+pid;
			}else{
				layer.alert('请选择支付批次');
			}
		})

		$(".btn-success").click(function(){
			var key=$("input[name=keywords]").val();//layer.msg(key);
			if(key==''){
				layer.msg('请输入培训机构名字！',{icon:7,time:1500});//return false;
			}else{
				location.href="{:url('cost')}?keywords="+key;
			}

		})
	</script>
</body>
</html>